#include "threadsyncremotedb.h"
#include "SyncDataBase/syncremotedb.h"

ThreadSyncRemoteDB::ThreadSyncRemoteDB(QObject *parent) :
    QThread(parent)
{

}

void ThreadSyncRemoteDB::run()
{
    syncremoteDB=new SyncRemoteDB();
    connect(this,SIGNAL(sigSyncDB(QString,QString,QString,QString,QString,QString,QString,QString,QString,QStringList)),
            syncremoteDB,SLOT(slotSyncDB(QString,QString,QString,QString,QString,QString,QString,QString,QString,QStringList)));
    connect(syncremoteDB,SIGNAL(sigInfo(QString)),this,SIGNAL(sigInfo(QString)));
    connect(syncremoteDB,SIGNAL(sigError(QString)),this,SIGNAL(sigError(QString)));
    exec();
}

ThreadSyncRemoteDB::~ThreadSyncRemoteDB()
{
    exit(0);
    wait(100);
    syncremoteDB->deleteLater();
}
